Optimal. Leaf size=62 \[ -\frac {i a \cos ^5(c+d x)}{5 d}+\frac {a \sin (c+d x)}{d}-\frac {2 a \sin ^3(c+d x)}{3 d}+\frac {a \sin ^5(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3567, 2713}
\begin {gather*} \frac {a \sin ^5(c+d x)}{5 d}-\frac {2 a \sin ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}-\frac {i a \cos ^5(c+d x)}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2713
Rule 3567
Rubi steps
\begin {align*} \int \cos ^5(c+d x) (a+i a \tan (c+d x)) \, dx &=-\frac {i a \cos ^5(c+d x)}{5 d}+a \int \cos ^5(c+d x) \, dx\\ &=-\frac {i a \cos ^5(c+d x)}{5 d}-\frac {a \text {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=-\frac {i a \cos ^5(c+d x)}{5 d}+\frac {a \sin (c+d x)}{d}-\frac {2 a \sin ^3(c+d x)}{3 d}+\frac {a \sin ^5(c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 65, normalized size = 1.05 \begin {gather*} -\frac {i a \cos ^5(c+d x)}{5 d}+\frac {5 a \sin (c+d x)}{8 d}+\frac {5 a \sin (3 (c+d x))}{48 d}+\frac {a \sin (5 (c+d x))}{80 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 47, normalized size = 0.76
method | result | size |
derivativedivides | \(\frac {-\frac {i a \left (\cos ^{5}\left (d x +c \right )\right )}{5}+\frac {a \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(47\) |
default | \(\frac {-\frac {i a \left (\cos ^{5}\left (d x +c \right )\right )}{5}+\frac {a \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(47\) |
risch | \(-\frac {i a \,{\mathrm e}^{5 i \left (d x +c \right )}}{80 d}-\frac {i a \cos \left (d x +c \right )}{8 d}+\frac {5 a \sin \left (d x +c \right )}{8 d}-\frac {i a \cos \left (3 d x +3 c \right )}{16 d}+\frac {5 a \sin \left (3 d x +3 c \right )}{48 d}\) | \(74\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 49, normalized size = 0.79 \begin {gather*} -\frac {3 i \, a \cos \left (d x + c\right )^{5} - {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a}{15 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 66, normalized size = 1.06 \begin {gather*} \frac {{\left (-3 i \, a e^{\left (8 i \, d x + 8 i \, c\right )} - 20 i \, a e^{\left (6 i \, d x + 6 i \, c\right )} - 90 i \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 60 i \, a e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i \, a\right )} e^{\left (-3 i \, d x - 3 i \, c\right )}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 184 vs. \(2 (53) = 106\).
time = 0.23, size = 184, normalized size = 2.97 \begin {gather*} \begin {cases} \frac {\left (- 18432 i a d^{4} e^{9 i c} e^{5 i d x} - 122880 i a d^{4} e^{7 i c} e^{3 i d x} - 552960 i a d^{4} e^{5 i c} e^{i d x} + 368640 i a d^{4} e^{3 i c} e^{- i d x} + 30720 i a d^{4} e^{i c} e^{- 3 i d x}\right ) e^{- 4 i c}}{1474560 d^{5}} & \text {for}\: d^{5} e^{4 i c} \neq 0 \\\frac {x \left (a e^{8 i c} + 4 a e^{6 i c} + 6 a e^{4 i c} + 4 a e^{2 i c} + a\right ) e^{- 3 i c}}{16} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 220 vs. \(2 (54) = 108\).
time = 0.55, size = 220, normalized size = 3.55 \begin {gather*} -\frac {{\left (135 \, a e^{\left (3 i \, d x + i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 90 \, a e^{\left (3 i \, d x + i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 135 \, a e^{\left (3 i \, d x + i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 90 \, a e^{\left (3 i \, d x + i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 45 \, a e^{\left (3 i \, d x + i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 45 \, a e^{\left (3 i \, d x + i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 12 i \, a e^{\left (8 i \, d x + 6 i \, c\right )} + 80 i \, a e^{\left (6 i \, d x + 4 i \, c\right )} + 360 i \, a e^{\left (4 i \, d x + 2 i \, c\right )} - 240 i \, a e^{\left (2 i \, d x\right )} - 20 i \, a e^{\left (-2 i \, c\right )}\right )} e^{\left (-3 i \, d x - i \, c\right )}}{960 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.93, size = 70, normalized size = 1.13 \begin {gather*} -\frac {2\,a\,\left (-\frac {75\,\sin \left (c+d\,x\right )}{16}-\frac {25\,\sin \left (3\,c+3\,d\,x\right )}{32}-\frac {3\,\sin \left (5\,c+5\,d\,x\right )}{32}+\frac {\cos \left (c+d\,x\right )\,15{}\mathrm {i}}{16}+\frac {\cos \left (3\,c+3\,d\,x\right )\,15{}\mathrm {i}}{32}+\frac {\cos \left (5\,c+5\,d\,x\right )\,3{}\mathrm {i}}{32}\right )}{15\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________